/*
 * =====================================================================================
 *
 *       Filename:  main.c
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  17.4.2013 20:35:26
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  YOUR NAME (), 
 *   Organization:  
 *
 * =====================================================================================
 */

#include <stdio.h>

#include "compareProcs.h"

#define MAX_PID 32768


int main(int argc, char *argv[])
{
/*
    int suspicious[MAX_PID];

    int discover = getAllSuspicious(suspicious, MAX_PID, BY_PROC);
    if(discover == 0) {
        printf("Nebyli nalezeny zadne podezrele procesy dle proc\n");
    }
    else {
        for(int i = 0; i < discover; i++) {
            printf("Byl nalezen podezrely proces s PID %d\n", suspicious[i]);
        }

        printf("Bylo nalezeno %d podezrelych procesu dle proc\n", discover);
    }


    printf("\n");
    discover = getAllSuspicious(suspicious, MAX_PID, BY_PS);
    if(discover == 0) {
        printf("Nebyli nalezeny zadne podezrele procesy dle ps\n");
    }
    else {
        for(int i = 0; i < discover; i++) {
            printf("Byl nalezen podezrely proces s PID %d\n", suspicious[i]);
        }

        printf("Bylo nalezeno %d podezrelych procesu dle ps\n", discover);
    }


    printf("\n");
    discover = getAllSuspicious(suspicious, MAX_PID, ALL);
    if(discover == 0) {
        printf("Nebyli nalezeny zadne podezrele procesy dle ALL\n");
    }
    else {
        for(int i = 0; i < discover; i++) {
            printf("Byl nalezen podezrely proces s PID %d\n", suspicious[i]);
        }

        printf("Bylo nalezeno %d podezrelych procesu dle ALL\n", discover);
    }
*/

    int suspicious[MAX_PID];
    //int discover = getAllSuspicious(suspicious, MAX_PID, ALL, FROM_TASKLIST);
    int discover = getAllSuspicious(suspicious, MAX_PID, BY_PS, FROM_KILL);

    if(discover == 0) {
        printf("Nebyli nalezeny zadne podezrele procesy\n");
    }
    else {
        printInfo(suspicious, discover);
    }
        
    return 0;
}
